The present invention relates to a servo system controller having a sequence controlling section for executing a sequence program repetitively and a positioning controlling section for generating a positioning command of a servo motor based on a command issued from this sequence controlling section.
FIG. 14 is a block diagram showing a configuration of a conventional servo system controller. In FIG. 14, 100 denotes a servo system controller main body. This servo system controller main body 100 comprises a sequence controlling section 2 and a positioning controlling section 300.
As shown in FIG. 14, the sequence controlling section 2 includes a sequence control CPU 4, a control memory 5, an input/output interface 6, a peripheral device interface 7, and a device memory, e.g., a common memory 41.
A sequence program and a system program which are executed by the CPU 4 in the sequence controlling section 2 are stored in the control memory 5.
An input unit 8 and an output unit 9 of a controlled object are connected to the input/output interface 6.
Input information which are input from the controlled object (not shown) via the input unit 8, internal information, output information for the controlled object are stored in the common memory 41. The input information is updated every time when the sequence program is executed. Variables such as device names register numbers, etc. indicating storing areas for the input information, the internal information, and the output information in the common memory 41 are described in the sequence program. The internal information and the output information in the common memory 41 are updated by executing repeatedly the sequence program, and the output unit 9 is operated based on the output information to control the controlled object.
As shown in FIG. 14, the positioning controlling section 300 includes a positioning control CPU 10, a control memory 11, a positioning control program memory 12, an area signal parameter memory 38, a servo interface 15, and an area signal output interface 39.
A system program which is executed by the CPU 10 in the positioning controlling section 300 is stored in the control memory 11.
A servo controller 20 which executes drive control of a servo motor (not shown) is connected to the servo interface 15.
An area signal output unit 40 is connected to the area signal output interface 39. An area signal which changes in response to a current position of the servo motor is output from the area signal output unit 40 to the outside. If the servo motor drives a table via ball screws, the current position of the servo motor indicates a current position of the table.
The sequence program, a positioning control program, and an area signal output pattern are written into the control memory 5, the positioning control program memory 12, and the area signal parameter memory 38 by peripheral devices via the peripheral interface 7.
The common memory 41 in the sequence controlling section 2 is a memory which is called a dual port memory or a bilateral memory, and can be accessed by either the sequence control CPU 4 in the sequence controlling section 2 or the positioning control CPU 10 in the positioning controlling section 300.
FIG. 15 is a diagram showing a part of a memory configuration of the common memory 41. In FIG. 15, 41a denotes an area in which device information is stored, 41b denotes an area in which start information is stored, and 41c denotes an area in which monitor information is stored.
Next, an operation of the conventional servo system controller main body 100 shown in FIG. 14 will be explained.
The sequence controlling section 2 writes predetermined device information into the area 41a of the common memory 41 and writes predetermined start information into the area 41b of the common memory 41 by executing the sequence program.
The positioning controlling section 300 monitors the area 41b of the common memory 41, then reads the device information from the area 41a if the predetermined start information is written therein, and then executes the positioning control program in the positioning control program memory 12 which is designated by the device information. The positioning controlling section 300 sends a predetermined position command to the servo controller 20 via the servo interface 15 by executing this positioning control program. The servo controller 20 executes drive control of the servo motor based on this position command.
The positioning controlling section 300 compares the area signal output pattern stored in the area signal parameter memory 38 with the current position of the servo motor, and then turns an area signal which is output from the area signal output unit 40 to the outside via the area signal output interface 39 to its ON state (active state) if the current position of the servo motor is in an ON output range of the area signal output pattern.
Also, the positioning controlling section 300 stores command positions supplied to the servo controller 20, servo control information such as the current position of the servo motor, deviation counter values, current values, revolution numbers, etc., error information, and the like in the monitor area 41c of the random common memory 41 during the positioning operation.
The positioning controlling section 300 stores information indicating that positioning has been completed into the area 41c of the common memory 41 when the positioning is completed.
As described above, the area signal output pattern has been written in advance in the area signal parameter memory 38 by the peripheral devices. The area signal output pattern written in the area signal parameter memory 38 is compared with the current position of the servo motor serving as comparison data, and then the comparison result is output from the area signal output unit 40 to the outside as the area signal.
In the above-described conventional servo system controller, there are problems described in following items (1) to (5).
(1) As described above, normally the area signal is generated by using the current position of the servo motor as the comparison data. In this case, if the area signal is generated by using other servo control information as the comparison data, the sequence program in which a comparing process program for comparing other servo control information with the comparison data is described is prepared, and then the area signal is generated by executing the scanning of this sequence program.
Since the sequence program is executed in asynchronism with the arithmetic period of the positioning controlling section, a long time (response time) is required to change the servo output after it has been detected that the servo control information reaches a predetermined value, and thus huge variation in the response time is caused. Hence, a tact time of the system is long and the machining precision is degraded. In case the machining speed is increased for purpose of reducing the tact time, such influences become remarkable. Thus, an execution time of the sequence program must be shortened in order to reduce the response time or to stabilize the response time. Therefore, there are such problems that a high performance CPU is needed and a production cost is increased.
(2) If the area signal output is generated by using, as the comparison data, contents of the device memory which are designated by the device name (variable) and the register number described in the sequence program, such area signal is also generated by executing the scanning of the sequence program in which the comparing process program is described. Accordingly, in this case, the execution time of the sequence program must also be shortened in order to reduce the response time or to stabilize the response time, like the above case. Therefore, there are such problems that the high performance CPU is needed and the production cost is increased.
(3) Even if unused output points of the output points which are prepared for the area signal output unit are present, these output points are used exclusively for the area signals which are output based on the positioning control program. Therefore, there is such a problem that these output points cannot be used as the output points for the device which can be designated by the sequence program.
(4) The system is constructed such that the area signal output pattern is input previously by the peripheral devices and written into the area signal parameter memory 38. Therefore, if the area signal output pattern is to be changed, such area signal output pattern must be written similarly into the area signal parameter memory 38 via the peripheral devices.
(5) As described above, the system is constructed such that the area signal output pattern is input previously by the peripheral devices and written into the area signal parameter memory 38. However, there is such a problem that the number of the ON output ranges cannot be set arbitrarily.
The present invention has been made to overcome the above problems and it is an object of the present invention to provide a servo system controller which is capable of shortening the response time, reducing the tact time, and improving the machining precision without large increase of the cost even if the area signal is generated by using not only the current position of the servo motor as the comparison data but also the address contents of the device memory being designated by the device names (variables) and the register numbers described in the sequence program as the comparison data.
Also, it is an object of the present invention to provide a servo system controller which is capable of selecting arbitrarily the output unit which outputs the area signal.
Further, it is an object of the present invention to provide a servo system controller which is capable of setting arbitrarily the number of the ON output ranges.
In the servo system controller according to the present invention, a sequence controlling section which has a device memory in which device information such as output information, internal information, input information indicating a state of a controlled object, etc. are stored and a control memory for storing a sequence program in which variables indicating storing areas of the device information are described can repeat an operation for updating the input information and an operation for updating the output information or the internal information based on the sequence program and control the controlled object via the output information, a positioning controlling section which accesses the device memory and executes a positioning control program based on a command from the sequence controlling section to output a predetermined position command and has a comparing process table memory in which the device information and range information are set previously in response to a plurality of output units respectively can decide whether or not the device information is in a range indicated by the range information and then perform a process for outputting a decision result to the output units for the plurality of output units by referring to the comparing process table memory, and a servo controller executes servo driving control of a predetermined motor based on the position command. Therefore, in case the process which decides whether or not the value of the device information is in the range indicated by the range information and then outputs the decision result to the output unit is applied to a plurality of output units, there can be achieved such advantages that such process can be performed on the positioning controlling section, the increase and the variation of the decision process time can be prevented, and the tact time can be reduced without large increase of the cost if this operation is applied to the machining apparatus. Also, there can be achieved such an advantage that, if the increase and the variation of the decision process time have the influence upon the machining precision, reduction in the machining precision can be prevented.
Further, it is decided every execution period of the positioning control program whether or not a value of the device information is in a range indicated by the corresponding range information, and the process for outputting the decision result to the output units is performed for the plurality of output units. Therefore, if the process which decides whether or not the value of the device information is in the range indicated by the range information and then outputs the decision result to the output unit is applied to a plurality of output units, there can be achieved such advantages that such process can be performed easily on the positioning controlling section, the increase and the variation of the decision process time can be prevented more firmly, and the tact time can be reduced without large increase of the cost if this operation is applied to the machining apparatus. Also, there can be achieved such an advantage that, if the increase and the variation of the decision process time have the influence upon the machining precision, reduction in the machining precision can be prevented much more.
Furthermore, an area for storing the range information is provided in the device memory, the sequence controlling section executes the sequence program in which variables indicating this area are described, and the positioning controlling section obtains the range information from this area at a time of execution of the positioning control program Therefore, there is such an advantage that the range information can be changed easily by the sequence program.
Moreover, a plurality of pieces of range information are set previously for one output unit, and it is decided whether or not a value of corresponding device information is in a range indicated by the plurality of pieces of range information. Therefore, there is such an advantage that this system mates with the case where a plurality of pieces of range information are provided to one output unit correspondingly.